package com.thunder.rebot.rebotclient.entity;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;

public class LoginEntity {


    static public void register (EndPoint endPoint) {
        Kryo kryo = endPoint.getKryo();
        kryo.register(byte[].class);
        kryo.register(Long.class);
        kryo.register(LoginEntity.Request.class);
        kryo.register(LoginEntity.Response.class);
    }

    public static class Request{

        private String name;
        private String passwd;

        public Request(){

        }

        public Request(String name, String passwd) {
            this.name = name;
            this.passwd = passwd;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPasswd() {
            return passwd;
        }

        public void setPasswd(String passwd) {
            this.passwd = passwd;
        }



        @Override
        public String toString() {
            return "Request{" +
                    "name='" + name + '\'' +
                    ", passwd='" + passwd + '\'' +
                    '}';
        }
    }

    public static class Response{


        public Response() {
        }

        public Response(String state) {
            this.state = state;
        }

        private String state;

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        @Override
        public String toString() {
            return "Response{" +
                    "state='" + state + '\'' +
                    '}';
        }
    }

}
